package com.linwen.javase.desgin_pattern.BigTalkDesignPattenJAVACode._04代理模式._3代理送花;

/**
 * @ClassName Proxy
 * @Description TODO
 * @Author zero
 * @DATE 2023/7/11 1:41 PM
 * @Version 1.0
 */
public class Proxy implements IGiveGift{
    private SchoolGirl anyGirl;
    private IGiveGift realPrusuit;
    public Proxy(SchoolGirl girlLjj) {
        this.anyGirl = girlLjj;
        this.realPrusuit = new Pursuit();
    }

    @Override
    public void giveDolls() {
        System.out.print(this.anyGirl.getName());
        this.realPrusuit.giveDolls();
    }

    @Override
    public void giveFlowers() {
        System.out.print(this.anyGirl.getName());
        this.realPrusuit.giveFlowers();
    }

    @Override
    public void giveChocolate() {
        System.out.print(this.anyGirl.getName());
        this.realPrusuit.giveChocolate();
    }
}
